-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: trickle validators #6660
feat: trickle validators #6660
Conversation
Test Results (CI) 3 files 129 suites 41m 30s ⏱️ Results for commit 7ff6931. ♻️ This comment has been updated with latest results. |
Test Results (Integration tests) 2 files 11 suites 24m 8s ⏱️ For more details on these failures, see this check. Results for commit 7ff6931. ♻️ This comment has been updated with latest results. |
base_layer/core/src/chain_storage/lmdb_db/validator_node_store.rs
Outdated
Show resolved
Hide resolved
base_layer/core/src/chain_storage/lmdb_db/validator_node_store.rs
Outdated
Show resolved
Hide resolved
Interesting approach. LGTM, apart form failing clippy and tests. |
519b945
to
7ff6931
Compare
Description
We allow here only a configured (in Consensus constants) number of validator nodes to be active in an epoch, so this way we avoid having way too much validators appear at the same time.
All the validator nodes are saved to the blockchain database, when there is a new validator node registration UTXO, but with a different
start epoch
that is calculated from the already saved validator nodes.There is a new gRPC method called
GetValidatorNodeChanges
, where we can ask base node to give back all the validator node additions and deletions in the given start/end height range.When Layer-2 scans new blocks and sees that there is a change in the validator node set, simply calls this new grpc method and adds/removes validator nodes. This way base node controls fully how many nodes are registered at which epoch.
Motivation and Context
Layer-2 validator nodes are registered all at once when they were added to the chain with a special UTXO, but it allows to register too many nodes at the same time, so consensus can catch up much slower.
How Has This Been Tested?
What process can a PR reviewer use to test or verify this change?
Breaking Changes